#ifndef MAPDRAWER_H
#define MAPDRAWER_H
#include <pangolin/pangolin.h>

#include "Map.h"

class MapDrawer
{
public:
	MapDrawer(Map* pMap, float keyFrameSize, float keyFrameLineWidth,
				float graphLineWidth, float pointSize, float cameraSize, float cameraLineWidth);
	~MapDrawer();


	void DrawMapPoints();

	void DrawKeyFrames(const bool bDrawKF, const bool bDrawGraph);

	void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc);

	void SetCurrentCameraPose(const cv::Mat &Tcw);

	void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M);

	Map* m_Map;
private:

	float m_KeyFrameSize;
	float m_KeyFrameLineWidth;
	float m_GraphLineWidth;
	float m_PointSize;
	float m_CameraSize;
	float m_CameraLineWidth;

	cv::Mat m_CameraPose;
	std::mutex m_MutexCamera;
};
#endif //MAPDRAWER_H
